home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
NEW_TECH
/
MENTC.ZIP
/
EDEF.H
< prev
next >
Wrap
Text File
|
1993-04-18
|
18KB
|
370 lines
/* EDEF: Global variable definitions for
MicroEMACS 3.9
written by Daniel Lawrence
based on code by Dave G. Conroy,
Steve Wilhite and George Jones
*/
#ifdef maindef
/* for MAIN.C */
/* initialized global definitions */
NOSHARE int DNEAR fillcol = 70; /* Current fill column */
NOSHARE short kbdm[NKBDM]; /* Macro */
NOSHARE char *execstr = NULL; /* pointer to string to execute */
NOSHARE char golabel[NPAT] = ""; /* current line to go to */
NOSHARE char paralead[NPAT] = " \t"; /* paragraph leadin chars */
NOSHARE char fmtlead[NPAT] = ""; /* format command leadin chars */
NOSHARE char mainbuf[] = "main"; /* name of main buffer */
NOSHARE char lterm[NSTRING]; /* line terminators on file write */
NOSHARE unsigned char wordlist[256]; /* characters considered "in words" */
NOSHARE int DNEAR wlflag = FALSE; /* word list enabled flag */
NOSHARE int DNEAR clearflag = TRUE; /* clear screen on screen change? */
NOSHARE int DNEAR execlevel = 0; /* execution IF level */
NOSHARE int DNEAR eolexist = TRUE; /* does clear to EOL exist? */
NOSHARE int DNEAR revexist = FALSE; /* does reverse video exist? */
NOSHARE int DNEAR exec_error = FALSE; /* macro execution error pending? */
NOSHARE int DNEAR flickcode = TRUE; /* do flicker supression? */
CONST char *modename[] = { /* name of modes */
"WRAP", "CMODE", "SPELL", "EXACT", "VIEW", "OVER",
"MAGIC", "CRYPT", "ASAVE", "REP"};
CONST char modecode[] = "WCSEVOMYAR"; /* letters to represent modes */
NOSHARE int DNEAR numfunc = NFUNCS; /* number of bindable functions */
NOSHARE int DNEAR gmode = 0; /* global editor mode */
NOSHARE int DNEAR gflags = GFREAD; /* global control flag */
NOSHARE int DNEAR gfcolor = 7; /* global forgrnd color (white) */
NOSHARE int DNEAR gbcolor = 0; /* global backgrnd color (black)*/
NOSHARE int DNEAR deskcolor = 0; /* desktop background color */
NOSHARE int DNEAR gasave = 256; /* global ASAVE size */
NOSHARE int DNEAR gacount = 256; /* count until next ASAVE */
NOSHARE int DNEAR sgarbf = TRUE; /* TRUE if screen is garbage */
NOSHARE int DNEAR mpresf = FALSE; /* TRUE if message in last line */
NOSHARE int DNEAR clexec = FALSE; /* command line execution flag */
NOSHARE int DNEAR mstore = FALSE; /* storing text to macro flag */
NOSHARE int DNEAR discmd = TRUE; /* display command flag */
NOSHARE int DNEAR disinp = TRUE; /* display input characters */
NOSHARE int DNEAR modeflag = TRUE; /* display modelines flag */
NOSHARE int DNEAR popflag = FALSE; /* pop-up windows enabled? */
NOSHARE int cpending = FALSE; /* input character pending? */
NOSHARE int charpending; /* character pushed back */
NOSHARE int DNEAR sscroll = FALSE; /* smooth scrolling enabled flag*/
NOSHARE int DNEAR hscroll = TRUE; /* horizontal scrolling flag */
NOSHARE int DNEAR hjump = 1; /* horizontal jump size */
NOSHARE int DNEAR ssave = FALSE; /* safe save flag */
NOSHARE struct BUFFER *bstore = NULL; /* buffer to store macro text to*/
NOSHARE int DNEAR vtrow = 0; /* Row location of SW cursor */
NOSHARE int DNEAR vtcol = 0; /* Column location of SW cursor */
NOSHARE int DNEAR ttrow = HUGE; /* Row location of HW cursor */
NOSHARE int DNEAR ttcol = HUGE; /* Column location of HW cursor */
NOSHARE int DNEAR lbound = 0; /* leftmost column of current line
being displayed */
NOSHARE int DNEAR taboff = 0; /* tab offset for display */
NOSHARE int DNEAR tabsize = 4; /* current hard tab size */
NOSHARE int DNEAR stabsize = 0; /* current soft tab size (0: use hard tabs) */
NOSHARE int DNEAR reptc = CTRL | 'U'; /* current universal repeat char*/
NOSHARE int DNEAR abortc = CTRL | 'G'; /* current abort command char */
NOSHARE int DNEAR sterm = CTRL | '['; /* search terminating character */
NOSHARE int DNEAR searchtype = SRNORM; /* current search style */
NOSHARE int DNEAR yankflag = TRUE; /* current yank style */
NOSHARE int DNEAR prefix = 0; /* currently pending prefix bits */
NOSHARE int DNEAR prenum = 0; /* " " numeric arg */
NOSHARE int DNEAR predef = TRUE; /* " " default flag */
NOSHARE int DNEAR quotec = CTRL | 'Q'; /* quote char during mlreply() */
NOSHARE CONST char *cname[] = { /* names of colors */
"BLACK", "RED", "GREEN", "YELLOW", "BLUE",
"MAGENTA", "CYAN", "GREY",
"GRAY", "LRED", "LGREEN", "LYELLOW", "LBLUE",
"LMAGENTA", "LCYAN", "WHITE"};
NOSHARE KILL *kbufp = NULL; /* current kill buffer chunk pointer*/
NOSHARE KILL *kbufh = NULL; /* kill buffer header pointer */
NOSHARE int kskip = 0; /* # of bytes to skip in 1st kill chunk */
NOSHARE int kused = KBLOCK; /* # of bytes used in last kill chunk*/
NOSHARE WINDOW *swindow = NULL; /* saved window pointer */
NOSHARE int cryptflag = FALSE; /* currently encrypting? */
NOSHARE int oldcrypt = FALSE; /* using old(broken) encryption? */
NOSHARE short *kbdptr; /* current position in keyboard buf */
NOSHARE short *kbdend = &kbdm[0]; /* ptr to end of the keyboard */
NOSHARE int DNEAR kbdmode = STOP; /* current keyboard macro mode */
NOSHARE int DNEAR kbdrep = 0; /* number of repetitions */
NOSHARE int DNEAR restflag = FALSE; /* restricted use? */
NOSHARE int DNEAR lastkey = 0; /* last keystoke */
NOSHARE int DNEAR seed = 0; /* random number seed */
NOSHARE long envram = 0l; /* # of bytes current in use by malloc */
NOSHARE int DNEAR macbug = FALSE; /* macro debugging flag */
NOSHARE int DNEAR mouseflag = TRUE; /* use the mouse? */
NOSHARE int DNEAR diagflag = FALSE; /* diagonal mouse movements? */
CONST char errorm[] = "ERROR"; /* error literal */
CONST char truem[] = "TRUE"; /* true literal */
CONST char falsem[] = "FALSE"; /* false litereal */
NOSHARE int DNEAR cmdstatus = TRUE; /* last command status */
NOSHARE char palstr[49] = ""; /* palette string */
NOSHARE char lastmesg[NSTRING] = ""; /* last message posted */
NOSHARE char *lastptr = NULL; /* ptr to lastmesg[] */
NOSHARE int DNEAR saveflag = 0; /* Flags, saved with the $target var */
NOSHARE char *fline = NULL; /* dynamic return line */
NOSHARE int DNEAR flen = 0; /* current length of fline */
NOSHARE int DNEAR rval = 0; /* return value of a subprocess */
NOSHARE int DNEAR eexitflag = FALSE; /* EMACS exit flag */
NOSHARE int DNEAR eexitval = 0; /* and the exit return value */
NOSHARE int xpos = 0; /* current column mouse is positioned to*/
NOSHARE int ypos = 0; /* current screen row " */
NOSHARE int nclicks = 0; /* cleared on any non-mouse event */
NOSHARE int disphigh = FALSE; /* display high bit chars escaped */
/* uninitialized global definitions */
NOSHARE int DNEAR currow; /* Cursor row */
NOSHARE int DNEAR curcol; /* Cursor column */
NOSHARE int DNEAR thisflag; /* Flags, this command */
NOSHARE int DNEAR lastflag; /* Flags, last command */
NOSHARE int DNEAR curgoal; /* Goal for C-P, C-N */
NOSHARE WINDOW *curwp; /* Current window */
NOSHARE BUFFER *curbp; /* Current buffer */
NOSHARE WINDOW *wheadp; /* Head of list of windows */
NOSHARE BUFFER *bheadp; /* Head of list of buffers */
NOSHARE SCREEN *first_screen; /* Head and current screen in list */
NOSHARE BUFFER *blistp; /* Buffer for C-X C-B */
NOSHARE BUFFER *slistp; /* Buffer for A-B */
NOSHARE char sres[NBUFN]; /* current screen resolution */
NOSHARE char lowcase[HICHAR]; /* lower casing map */
NOSHARE char upcase[HICHAR]; /* upper casing map */
NOSHARE char pat[NPAT]; /* Search pattern */
NOSHARE char tap[NPAT]; /* Reversed pattern array. */
NOSHARE char rpat[NPAT]; /* replacement pattern */
/* Various "Hook" execution variables */
NOSHARE KEYTAB readhook; /* executed on all file reads */
NOSHARE KEYTAB wraphook; /* executed when wrapping text */
NOSHARE KEYTAB cmdhook; /* executed before looking for a command */
NOSHARE KEYTAB writehook; /* executed on all file writes */
NOSHARE KEYTAB exbhook; /* executed when exiting a buffer */
NOSHARE KEYTAB bufhook; /* executed when entering a buffer */
/* The variable patmatch holds the
string that satisfies the search com